package com.wpre.vampiremq.mqclient;

import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:连接工厂，主要功能是创建出连接Connection对象
 * User: LianBao
 * Date: 2025-01-19
 * Time: 20:43
 */
public class ConnectionFactory {
    private String host;
    private int port;

    public Connection newConnection() throws IOException {
        Connection connection = new Connection(host,port);
        return connection;
    }


    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }
}
